package com.qfedu.controller;

import com.qfedu.entity.Student;
import com.qfedu.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class StudentController {

    @Autowired
    private StudentService studentService;

    @RequestMapping("/test")
    @ResponseBody
    public String test(){

        return "hello";
    }

    @RequestMapping("/findStudentById")
    @ResponseBody
    public Student findStudentById(int id){

        return studentService.findStudentById(id);
    }

}
